<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<load href="/{$Think.APP_NAME}/Public/Css/easyui.css"/>
<load href="/{$Think.APP_NAME}/Public/Js/jquery.min.js"/>
<load href="/{$Think.APP_NAME}/Public/Js/jquery.easyui.min.js"/>
<style type="text/css">
table.gridtable {
	font-family: verdana,arial,sans-serif;
	font-size:12px;
	color:#333333;
	border-width: 1px;
	border-color: #666666;
	border-collapse: collapse;
	width:100%;
}
table.gridtable th {
	border-width: 1px;
	padding: 4px;
	border-style: solid;
	color:white;
	border-color: #666666;
	background-color: #3469D5;
	font-family: verdana, arial, sans-serif;
}
table.gridtable td {
	border-width: 1px;
	padding: 8px;
	border-style: solid;
	border-color: #666666;
	background-color: #ffffff;
	text-align: center;
}


.btn{
	height: 32px;
	text-align: center;
	font-size: 15px;
	margin: 0;
	padding-top:0px;
	padding-bottom:0px;
	padding-left: 10px;
	padding-right: 10px;
	letter-spacing: 1px;
	color:white;
}

</style>
</head>
<body>
<p align="left"><button class="l-btn btn" onclick="location.href='/{$Think.APP_NAME}/index.php/Info/studentnew'">我要发布</button><p>
<div>
  <table class="gridtable">
      <th width="18%">年级</th>
      <th width="18%">学科</th>
      <th width="25%">开始时间</th>
      <th width="25%">结束时间</th>
      <th>操作</th>
      <volist name="list" id="vo">
     <tr>
      <td name="grade">{$vo['grade']}</td>
      <td name="subject">{$vo['subject']} </td>
      <td name="start">{$vo['start']}</td>
      <td name="end">{$vo['end']}</td>
      <td style="padding: 0px;"><button href="javascript:void(0)" class="l-btn btn" style="height: 22px;" onclick="del(this);">删除</button></td>
    </tr>
    </volist>
  </table>  
</div>
<script>
	$("tr:even>td").css("background-color","#CBDAF9");
	$("tr:odd>td").css("background-color","#EBEEF3");
	$("tr>td:first").css("padding","4px");
	$("th:first").css("padding","0");
	


	function del(e) {
		grade = $(e).parent().parent().children("td[name='grade']").html();
		subject = $(e).parent().parent().children("td[name='subject']").html();
		start = $(e).parent().parent().children("td[name='start']").html();
		end = $(e).parent().parent().children("td[name='end']").html();
		window.parent.$.messager.confirm('', '确定删除？', function(r) {
			if(!r)
				return;
			htmlobj = $.ajax({
				url : "/{$Think.APP_NAME}/index.php/Info/studentdel?grade=" + grade + "&subject=" + subject
						+ "&start=" + start + "&end=" + end,
				async : false
			});
			if (htmlobj.responseText.match('true')) {
				window.parent.$.messager.alert('提示', '删除成功', 'info');
				location.href = '/{$Think.APP_NAME}/index.php/Info/studentmsg';
			} else {
				window.parent.$.messager.alert('提示', '删除失败', 'error');
			}
		});
	}
</script>

</body>
</html>